package admin

import (
	"context"
	"server/internal/service"

	"server/api/admin/system"
)

func (c *ControllerSystem) CrontabDelete(ctx context.Context, req *system.CrontabDeleteReq) (res *system.CrontabDeleteRes, err error) {
	res = new(system.CrontabDeleteRes)
	res.Affected, err = service.SystemCrontab().DeleteByID(ctx, req.Id)
	return
}
